package com.xiaoma.chat.vo;

import java.util.Date;

import com.xiaoma.chat.domain.User;

public class UserVo {

    private Integer id;
    private String imUserId;
    private String name;
    private String nickname;
    private String portraitUri;
    private String token;
    private Integer organizationId;
    private Date createdAt;
    private Integer role;
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getImUserId() {
        return imUserId;
    }
    public void setImUserId(String imUserId) {
        this.imUserId = imUserId;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getNickname() {
        return nickname;
    }
    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
    public String getPortraitUri() {
        return portraitUri;
    }
    public void setPortraitUri(String portraitUri) {
        this.portraitUri = portraitUri;
    }
    public String getToken() {
        return token;
    }
    public void setToken(String token) {
        this.token = token;
    }
    public Integer getOrganizationId() {
        return organizationId;
    }
    public void setOrganizationId(Integer organizationId) {
        this.organizationId = organizationId;
    }
    public Date getCreatedAt() {
        return createdAt;
    }
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
    public Integer getRole() {
        return role;
    }
    public void setRole(Integer role) {
        this.role = role;
    }
    
    public void build(User user, int role) {
        this.id = user.getId();
        this.createdAt = user.getCreatedAt();
        this.imUserId = user.getImUserId();
        this.name = user.getName();
        this.nickname = user.getNickname();
        this.organizationId = user.getOrganizationId();
        this.portraitUri = user.getPortraitUri();
        this.token = user.getToken();
        this.role = role;
        
    }
    
}
